{extend name="main"}
{block name="style"}
<style type="text/css">
.w-60px{width: 60px;}
.el-tag--plain.el-tag--primary{background-color: transparent;border-color: #6187ed;border-radius:24px;}
.text-FEFEFE{color: #FEFEFE;}
</style>
{/block}
{block name="header"}
{include file="module/top_nav" container="container-xl"/}
{include file="module/header_concise"/}
{/block}
{block name="body"}
<div class="bg-444C5F">
	<div class="container-xl">
		<div class="flex py-4 flex-center">
			<div class="flex-1">
				<div class="flex flex-center">
					<div>
						<div class="bg-FEFEFE w-20px h-20px text-truncate rounded">
							<img src="{$Find.company_logo}" style="object-fit: contain;width: 100%;height: 100%;">
						</div>
					</div>
					<a href="/company/{$Find.company_id}.html" target="_blank" class="pl-3 el-link el-link--info text-grey">{empty name="Find.company_sname"}{$Find.company_name}{else/}{$Find.company_sname}{/empty}招聘中</a>
					<div class="pl-3 text-grey">{$Find.refresh_time}发布</div>
				</div>
				<div class="text-FEFEFE h4 pt-3">
					{$Find.title}
					<span class="pl-3 text-FF586C">
					{gt name="Find.salary_min" value="0"}
					{eq name="Find.jobs_salary_show_type" value="1"}
						{if $Find.salary_min==$Find.salary_max}
								{$Find.salary_min}元
							{else /}
								{$Find.salary_min}-{$Find.salary_max}元
						{/if}
					{else/}
						{if $Find.salary_min==$Find.salary_max}
								{$Find.salary_min/1000}k
							{else /}
								{$Find.salary_min/1000}-{$Find.salary_max/1000}k
						{/if}
						
					{/eq}
					{gt name="Find.salary_year" value="12"}
						{$Find.salary_year}薪
					{/gt}
					{else/}
					面议
					{/gt}
					</span>
				</div>
				<div class="text-grey mb-3">{$Find.jobs_city}·{$Find.exp_level}·{$Find.education_level}</div>
				<div>
					{volist name="Find.jobs_welfare" id="v"}
					<el-tag type="primary" size="small" effect="plain">{$v}</el-tag>
					{/volist}
				</div>
			</div>
			<div class="text-right">
				<div class="flex pb-4">
					<div class="text-center">
						<h5 class="text-FEFEFE">{$Find.view}</h5>
						<div class="text-FEFEFE">浏览数</div>
					</div>
					<div class="text-center pl-4">
						<h5 class="text-FEFEFE">{$Find.delivery_resume}</h5>
						<div class="text-FEFEFE">投递简历人数</div>
					</div>
					<div class="text-center pl-4">
						<h5 class="text-FEFEFE">{$Find.resume_efficiency}<small>%</small></h5>
						<div class="text-FEFEFE">简历处理率</div>
					</div>
					<div class="text-center pl-4">
						<h5 class="text-FEFEFE">{$Find.online_time}</h5>
						<div class="text-FEFEFE">企业最近登录</div>
					</div>
				</div>
				<el-button type="info" size="small" v-if="Find.is_delivery">已投递</el-button>
				<el-button type="primary" size="small" icon="el-icon-plus" v-else="Find.is_delivery" @click="deliveryResume(Find)">投递简历</el-button>
			</div>
		</div>
	</div>
</div>
<div class="container-xl py-3">
	<div class="flex">
		<div class="flex-1">
			<div class="bg-white shadow text-secondary">
				<div class="p-4">
					<div class="flex mb-3">
						<div class="flex-1 block-title-before pb-2 text-dark">基本信息</div>
					</div>
					<div class="flex py-2">
						<div class="flex-1">
							<span class="text-secondary">工作性质：</span>
							{eq name="Find.jobs_type" value="1"}全职{else/}实习{/eq}
						</div>
						<div class="flex-1">
							<span class="text-secondary">招聘人数：</span>
							{gt name="Find.number_of_recruiters" value="0"}{$Find.number_of_recruiters}人{else/}若干{/gt}
						</div>
					</div>
					<div class="flex py-2">
						<div class="flex-1">
							<span class="text-secondary">学历要求：</span>
							{$Find.education_level}
						</div>
						<div class="flex-1">
							<span class="text-secondary">工作经验：</span>
							{$Find.exp_level}
						</div>
					</div>
					<div class="flex py-2">
						<div class="flex-1">
							<span class="text-secondary">工作地点：</span>
							{$Find.contacts_province}{$Find.contacts_city}{$Find.contacts_area}{$Find.contacts_address}
						</div>
					</div>
				</div>
				<div class="p-4">
					<div class="flex mb-3">
						<div class="flex-1 block-title-before pb-2 text-dark">职位描述</div>
					</div>
					<div class="text-secondary">{$Find.jobs_desc|raw}</div>
					<div class="flex pt-3 text-secondary">
						<div class="flex-1"></div>
						<div class="mr-3 pointer" @click="feedback.data=Find;feedback.win=true;feedback.form.type=7;feedback.form.alias_id=Find.id;">投诉</div>
						<div class="pointer" @click="toggleJobsCollection(Find)" v-if="Find.is_collection"><i class="el-icon-star-on mr-1"></i>取消收藏</div>
						<div class="pointer" @click="toggleJobsCollection(Find)" v-if="!Find.is_collection"><i class="el-icon-star-off mr-1"></i>收藏</div>
						{notempty name="Find.qr_code"}
						<el-popover
					    placement="top"
					    width="200"
					    trigger="hover">
					    <div class="p-2 text-center">
					    	<img src="{xycms:web name='imgurl'/}{$Find.qr_code}" width="140">
					    	<div class="small pt-2">微信“扫一扫”查看</div>
					    </div>
						<div class="pointer ml-3" slot="reference"><i class="el-icon-share mr-1"></i>分享</div>
					  	</el-popover>
						{/notempty}
					</div>
				</div>
				<div class="p-4 border-top">
					<div class="flex flex-center py-4">
						<div>
							<img src="{$Find.company_logo}" width="60" height="60" class="rounded-circle">
						</div>
						<div class="flex-1 px-3">
							<div class="h6 text-dark">{$Find.contacts}<el-button type="success" round size="minism" class="ml-3" icon="el-icon-chat-dot-round" plain @click="IMvm.applyToUserContacts(getImContactsUserData());">立即沟通</el-button></div>
							<div class="text-secondary">联系电话：<span>{$Find.contacts_mobile}</span></div>
						</div>
						<div class="pr-3 text-center">
							<el-button type="warning" @click="getContactsData()">查看联系方式</el-button>
						</div>
						<div class="text-center">
							<el-button type="info" v-if="Find.is_delivery">已投递</el-button>
							<el-button type="primary" v-else="Find.is_delivery" @click="deliveryResume(Find)">投递简历</el-button>
						</div>
					</div>
				</div>
			</div>
			{xycms:jobslistbyrand name="jrand" length="10"}
			<div class="bg-white mt-3 p-4 shadow">
				<div class="flex mb-3">
					<div class="flex-1 block-title-before pb-2">看了此职位的人还会看</div>
					<a href="/jobs?cid={$Find.jobs_cate3}" class="text-secondary" target="_blank">查看更多类似职位>></a>
				</div>
				<div class="row">
					{volist name="jrand" id="v"}
					<div class="col-6">
						<div class="flex py-3 flex-center">
							<a href="{xycms:web name='url'}/jobs/{$v.id}.html" target="_blank">
								<div class="bg-white w-60px h-60px text-truncate rounded-lg border border-grey">
									<img src="{$v.logo}" style="object-fit: contain;width: 100%;height: 100%;">
								</div>
							</a>
							<div class="flex-1 pl-3 text-secondary">
								<a href="{xycms:web name='url'}/jobs/{$v.id}.html" class="text-dark" target="_blank">{$v.title}</a>
								<div class="text-FF586C">
									{gt name="v.salary_min" value="0"}
									{eq name="v.jobs_salary_show_type" value="1"}
									{$v.salary_min}-{$v.salary_max}元
									{else/}
									{$v.salary_min}-{$v.salary_max}k
									{/eq}
									{else/}
									面议
									{/gt}
								</div>
								<div class="text-secondary">{$v.company_name}</div>
							</div>
						</div>
					</div>
					{/volist}
				</div>
			</div>
			{/xycms:jobslistbyrand}
		</div>
		<div class="w-300px ml-3">
			<div class="bg-white p-4 mb-3 shadow">
				<div class="flex mb-3">
					<div class="flex-1 block-title-before pb-2">公司基本信息</div>
				</div>
				<div class="flex flex-center">
					<div>
						<div class="bg-white w-50px h-50px text-truncate rounded-lg border border-grey">
							<img src="{$Find.company_logo}" style="object-fit: contain;width: 100%;height: 100%;">
						</div>
					</div>
					<a href="/company/{$Find.company_id}.html" target="_blank" class="pl-3 el-link el-link--info text-dark">{$Find.company_name}</a>
				</div>
				<div class="flex flex-center text-secondary pt-2">
					<div class="pr-3">性质</div>
					<div>{$Find.finance}</div>
				</div>
				<div class="flex flex-center text-secondary pt-2">
					<div class="pr-3">行业</div>
					<div>{$Find.industry}</div>
				</div>
				<div class="flex flex-center text-secondary pt-2">
					<div class="pr-3">规模</div>
					<div>{$Find.size_type}</div>
				</div>
				<div class="flex flex-center text-secondary pt-2">
					<div class="pr-3" style="min-width: 44px;">地址</div>
					<div>{$Find.company_city}</div>
				</div>
			</div>
			<div class="bg-white p-4 mb-3 shadow" style="background-image: url(__TEMPLATE_STATIC__/down_resume_bg.png);background-size: 100% 100%;">
				<div class="text-center">
					<img src="/displayQrcode?scheme={xycms:web name='downUrl'}/jobs/{$Find.id}&icon=1" width="120" height="120">
					<div class="text-small text-secondary mt-2">在{xycms:web name="name"}APP中查看</div>
				</div>
			</div>
			<div class="bg-white p-4 shadow">
				<div class="flex mb-3">
					<div class="flex-1 block-title-before pb-2">该公司其他职位</div>
				</div>
				{volist name="Jobs" id="v"}
				<a href="/jobs/{$v.id}.html" target="_blank" class="flex py-3 flex-center">
					<div>
						<div class="bg-white w-60px h-60px text-truncate rounded-lg border border-grey">
							<img src="{$v.logo}" style="object-fit: contain;width: 100%;height: 100%;">
						</div>
					</div>
					<div class="flex-1 pl-3 text-secondary">
						<div class="text-truncate text-dark">{$v.title}</div>
						<div class="text-FF586C">
							{gt name="v.salary_min" value="0"}
							{eq name="v.jobs_salary_show_type" value="1"}
							{$v.salary_min}-{$v.salary_max}元
							{else/}
							{$v.salary_min}-{$v.salary_max}k
							{/eq}
							{else/}
							面议
							{/gt}
						</div>
						<div class="text-secondary flex">
							<div class="flex-1 text-truncate">{$v.company_name}</div>
							<div>{$v.jobs_city}</div>
						</div>
					</div>
				</a>
				{/volist}
			</div>
		</div>
	</div>
</div>
{/block}
{block name="footer"}
{include file="module/footer"/}
{include file="module/login"/}
{/block}
{block name="script"}
<script type="text/javascript">
	{empty name="Find"}
	var Find={};
	{else/}
	var Find={:json_encode($Find,JSON_UNESCAPED_UNICODE)};
	{/empty}
</script>
<script type="text/javascript">
	var vm=new Vue({
		el:'#app',
		data:{
			view:XYBase.view,
			loginTabs:XYBase.loginTabs,
			userInfo:UserInfo,
			feedback:XYBase.feedback,
			Find:Find,
			confirm:0,
			Contacts:null
		},
		watch:{
		    view:XYBase.viewWatch,
		    loginTabs:XYBase.loginTabsWatch,
		},
		created(){
			XYBase.created(this);
		},
		methods:XYBase.methods({
			getImContactsUserData(){
				if (Find.company_sname)
					return {touid:Find.uid,nickname:Find.company_sname+'@'+Find.contacts,headimg:Find.company_logo,jobs_id:Find.id}
				return {touid:Find.uid,nickname:Find.company_name+'@'+Find.contacts,headimg:Find.company_logo,jobs_id:Find.id}
			},
			getContactsData(){
				if(this.Contacts)
					return this.showContacts();
				var _this=this;
				const loading=XYBase.openloading();
				_this.sendGet({
					url:'/jobs/getContactsData/'+_this.Find.id,
				},function(ret) {
					loading.close();
					if (ret) {
						if (ret.code === 0) {
							_this.Contacts=ret.data;
							_this.showContacts();
						}else if(ret.code === -600){
							_this.$confirm(ret.msg, '提示', {
								dangerouslyUseHTMLString:true,
					          	confirmButtonText: '去创建',
					          	cancelButtonText: '取消',
					          	type: 'warning'
					        }).then(() => {
					        	window.open('/user');
					        }).catch(() => {
					        });
						}else if(ret.code === 200){
							_this.$confirm(ret.msg, '提示', {
								dangerouslyUseHTMLString:true,
					          	confirmButtonText: '投递',
					          	cancelButtonText: '取消',
					          	type: 'warning'
					        }).then(() => {
					        	_this.deliveryResume(_this.Find);
					        }).catch(() => {
					        });
						}else{
							XYBase.msg(ret.msg);
						}
					}
				});
			},
			showContacts(){
		        const h = this.$createElement;
		        this.$msgbox({
		          title: '消息',
		          message: h('div', null, [
		            h('div', {class:'flex flex-center py-1'}, [
			            h('div', {class:'pr-2 w-60px'}, '联系人 ',[
			            	]),
			            h('div', null, this.Contacts.contacts)
			        ]),
		            h('div', {class:'flex flex-center py-1'}, [
			            h('div', {class:'pr-2 w-60px'}, '电话 ',[
			            	]),
			            h('a', {href:"tel://"+this.Contacts.contacts_mobile}, this.Contacts.contacts_mobile)
			        ]),
		            h('div', {class:'flex flex-center py-1'}, [
			            h('div', {class:'pr-2 w-60px'}, '地址 ',[
			            	]),
			            h('div', null, this.Contacts.jobs_province+this.Contacts.jobs_city+this.Contacts.jobs_area+this.Contacts.contacts_address)
			        ]),
		          ]),
		          showCancelButton: false,
		          confirmButtonText: '关闭'
		        }).then(action => {
		        });
			}
		})
	});
</script>
{/block}